package com.cx.controller;

import com.cx.service.HotelMapperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.cx.dto.AllHotel;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class SearchByKeyWords {
    @Autowired
    HotelMapperService hotelMapperService;
    @RequestMapping("searchByKeyWord")
    @ResponseBody
    public List<AllHotel> findByKeyWords(String cityName, String keyWord, String brandName){
        Integer flag = null;//标志位
        if(brandName != ""){
            flag = 1;//变换标志位
        }
        System.out.println(keyWord);
        System.out.println(brandName);
        return hotelMapperService.findHotelByKeyWords(keyWord);
    }
}
